import stream

Stream.of([1, 2, 3, 4, 5])
    .map(n => n + 1)
    .filter(n => n % 2 == 0)
    .forEach(println)

var s = Stream.of([1, 2, 3, 4, 5])
    .map(n => n + 1)
    .filter(n => n % 2 == 1)
    .toList()
println(s)
